package com.dahe.ysxt.vector.audit.dao;

import com.dahe.ysxt.vector.audit.entity.AuditResult;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface AuditDao extends CrudRepository<AuditResult, Long>, JpaSpecificationExecutor {
    @Query(value = "select id, ifnull (bsm, '') bsm, ifnull (name, '') name,  ifnull(site_classify, '') site_classify, " +
            "ifnull (title, '') title, ifnull (url, '') url, ifnull (error_words,'') error_words, ifnull(correct_words,'') correct_words, " +
            "ifnull(con_text, '') con_text, ifnull(con_text_md5, '') con_text_md5, ifnull(url_md5, '') url_md5, ifnull(audit_result,'') audit_result " +
            "from t_audit_qc_file_wjy where id >= :minId and id <= :maxId ", nativeQuery = true)
    List<AuditResult> queryAuditResults(@Param("minId") long minId, @Param("maxId") long maxId);


}
